{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "os.environ['CUDA_VISIBLE_DEVICES'] = ''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:Load quantized model will cause accuracy drop.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:74: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:74: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.\n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:76: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:76: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.\n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:51: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:51: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:66: The name tf.InteractiveSession is deprecated. Please use tf.compat.v1.InteractiveSession instead.\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/husein/.local/lib/python3.6/site-packages/malaya/function/__init__.py:66: The name tf.InteractiveSession is deprecated. Please use tf.compat.v1.InteractiveSession instead.\n",
      "\n",
      "WARNING:root:Load quantized model will cause accuracy drop.\n"
     ]
    }
   ],
   "source": [
    "import malaya\n",
    "\n",
    "model = malaya.dependency.transformer(model = 'xlnet', quantized = True)\n",
    "pos = malaya.pos.transformer(model = 'xlnet', quantized = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "t = 'Dirk Jan Klaas Huntelaar merupakan pemain bola sepak Belanda yang bermain di posisi penyerang'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "tokenizer = malaya.preprocessing.TOKENIZER().tokenize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "tokens = tokenizer(t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "graph, tagging, indexing = model.predict(' '.join(tokens))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: G Pages: 1 -->\n",
       "<svg width=\"548pt\" height=\"305pt\"\n",
       " viewBox=\"0.00 0.00 547.50 305.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 301)\">\n",
       "<title>G</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-301 543.5,-301 543.5,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<text text-anchor=\"middle\" x=\"205.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">0 (None)</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>2</title>\n",
       "<text text-anchor=\"middle\" x=\"173.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">2 (Jan)</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;2 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M198.8696,-260.9735C194.4931,-249.0751 188.6727,-233.2508 183.7108,-219.7606\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"186.8589,-218.1804 180.1219,-210.0034 180.2892,-220.5969 186.8589,-218.1804\"/>\n",
       "<text text-anchor=\"middle\" x=\"202.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">root</text>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>6</title>\n",
       "<text text-anchor=\"middle\" x=\"257.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">6 (pemain)</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;6 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M216.2744,-260.9735C223.5256,-248.8418 233.2162,-232.6287 241.3801,-218.9698\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"244.6132,-220.3827 246.7394,-210.0034 238.6046,-216.7913 244.6132,-220.3827\"/>\n",
       "<text text-anchor=\"middle\" x=\"246.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">root</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>1</title>\n",
       "<text text-anchor=\"middle\" x=\"126.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">1 (Dirk)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;1 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>6&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M230.3567,-173.9735C210.5964,-160.8503 183.6449,-142.9512 162.1495,-128.6756\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"163.8751,-125.6201 153.6085,-123.0034 160.0025,-131.4513 163.8751,-125.6201\"/>\n",
       "<text text-anchor=\"middle\" x=\"215.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">nsubj</text>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>5</title>\n",
       "<text text-anchor=\"middle\" x=\"223.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">5 (merupakan)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;5 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>6&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M250.4552,-173.9735C245.7596,-161.9585 239.4996,-145.9401 234.1942,-132.3646\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"237.4357,-131.0434 230.5358,-123.0034 230.9159,-133.5914 237.4357,-131.0434\"/>\n",
       "<text text-anchor=\"middle\" x=\"253.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cop</text>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>7</title>\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">7 (bola)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M270.3464,-173.9735C279.1583,-161.6085 290.9917,-145.0036 300.8396,-131.1847\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"303.7167,-133.1783 306.67,-123.0034 298.0162,-129.1158 303.7167,-133.1783\"/>\n",
       "<text text-anchor=\"middle\" x=\"321.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">compound</text>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>11</title>\n",
       "<text text-anchor=\"middle\" x=\"412.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">11 (bermain)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;11 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>6&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M296.2053,-177.1057C299.0099,-176.0483 301.797,-175.004 304.5,-174 326.6403,-165.7761 334.1628,-168.0093 354.5,-156 366.3435,-149.0063 378.008,-139.4289 387.7355,-130.4612\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"390.2588,-132.8914 395.0878,-123.461 385.4319,-127.8217 390.2588,-132.8914\"/>\n",
       "<text text-anchor=\"middle\" x=\"382.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">acl</text>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>3</title>\n",
       "<text text-anchor=\"middle\" x=\"33.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">3 (Klaas)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>1&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M107.2303,-86.9735C93.6385,-74.2586 75.2541,-57.0603 60.2437,-43.0183\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.4388,-40.279 52.745,-36.0034 57.6567,-45.3909 62.4388,-40.279\"/>\n",
       "<text text-anchor=\"middle\" x=\"96\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">flat</text>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>4</title>\n",
       "<text text-anchor=\"middle\" x=\"129.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">4 (Huntelaar)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;4 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M127.1216,-86.9735C127.5279,-75.1918 128.0669,-59.5607 128.529,-46.1581\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"132.0324,-46.1181 128.8792,-36.0034 125.0366,-45.8768 132.0324,-46.1181\"/>\n",
       "<text text-anchor=\"middle\" x=\"138\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">flat</text>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<text text-anchor=\"middle\" x=\"227.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">8 (sepak)</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;8 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>7&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M289.9073,-91.8189C278.8628,-85.9272 266.7674,-78.2151 257.5,-69 250.6198,-62.1586 244.7327,-53.423 240.0425,-45.1222\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"243.025,-43.2743 235.2665,-36.0593 236.8323,-46.5378 243.025,-43.2743\"/>\n",
       "<text text-anchor=\"middle\" x=\"286.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">compound</text>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>9</title>\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">9 (Belanda)</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;9 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>7&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M319.5,-86.9735C319.5,-75.1918 319.5,-59.5607 319.5,-46.1581\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"323.0001,-46.0033 319.5,-36.0034 316.0001,-46.0034 323.0001,-46.0033\"/>\n",
       "<text text-anchor=\"middle\" x=\"329\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">flat</text>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>10</title>\n",
       "<text text-anchor=\"middle\" x=\"412.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">10 (yang)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;10 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>11&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M412.5,-86.9735C412.5,-75.1918 412.5,-59.5607 412.5,-46.1581\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"416.0001,-46.0033 412.5,-36.0034 409.0001,-46.0034 416.0001,-46.0033\"/>\n",
       "<text text-anchor=\"middle\" x=\"427.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">nsubj</text>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>13</title>\n",
       "<text text-anchor=\"middle\" x=\"502.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">13 (posisi)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;13 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>11&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M431.1481,-86.9735C444.3015,-74.2586 462.0928,-57.0603 476.619,-43.0183\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"479.1185,-45.4701 483.8758,-36.0034 474.2533,-40.4371 479.1185,-45.4701\"/>\n",
       "<text text-anchor=\"middle\" x=\"471.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">obl</text>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>12</title>\n",
       "<text text-anchor=\"middle\" x=\"363.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">12 (di)</text>\n",
       "</g>\n",
       "<!-- 12&#45;&gt;12 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>12&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M390.7408,-286.8673C400.5239,-287.0365 408.5,-284.4141 408.5,-279 408.5,-275.7008 405.5382,-273.4382 401.0105,-272.2123\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"401.0519,-268.6975 390.7408,-271.1327 400.32,-275.6591 401.0519,-268.6975\"/>\n",
       "<text text-anchor=\"middle\" x=\"420.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">case</text>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>14</title>\n",
       "<text text-anchor=\"middle\" x=\"363.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">14 (penyerang)</text>\n",
       "</g>\n",
       "<!-- 12&#45;&gt;14 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>12&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M363.5,-260.9735C363.5,-249.1918 363.5,-233.5607 363.5,-220.1581\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.0001,-220.0033 363.5,-210.0034 360.0001,-220.0034 367.0001,-220.0033\"/>\n",
       "<text text-anchor=\"middle\" x=\"392.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">compound</text>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x7f43006eff98>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "graph.to_graphvis()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "import copy\n",
    "import re\n",
    "\n",
    "def reset_t(tokens):\n",
    "    t = []\n",
    "    for i in range(len(tokens)):\n",
    "        t.append([tokens[i], 2])\n",
    "    return t\n",
    "\n",
    "def augment_3_0(t, row, selected = ['compound', 'flat']):\n",
    "    text, tokens, tokens_lower, graph = row\n",
    "    l = list(graph.nodes.items())\n",
    "    for no, n in enumerate(l[1:]):\n",
    "        n = n[1]\n",
    "        if n['rel'] in selected and n['address'] - 1 == n['head']:\n",
    "            if n['word'] == t[n['head'] - 1][0]:\n",
    "                print('repeated word, continue')\n",
    "                continue\n",
    "            c = t[n['head'] - 1].copy()\n",
    "            c[1] = 3\n",
    "            t[n['head'] - 1] = [t[n['address'] - 1][0], 3]\n",
    "            t[n['address'] - 1] = c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "text = 'Dirk Jan Klaas Huntelaar merupakan pemain bola sepak Belanda yang bermain di posisi penyerang'\n",
    "tokens = tokenizer(text)\n",
    "graph, tagging, indexing = model.predict(' '.join(tokens))\n",
    "t = reset_t(tokens)\n",
    "t_ = copy.deepcopy(t)\n",
    "tokens_lower = tokenizer(text.lower())\n",
    "r = (t, tokens, tokens_lower, graph)\n",
    "augment_3_0(t_, r)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['Dirk', 2],\n",
       " ['Jan', 2],\n",
       " ['Huntelaar', 3],\n",
       " ['Klaas', 3],\n",
       " ['merupakan', 2],\n",
       " ['bola', 3],\n",
       " ['sepak', 3],\n",
       " ['pemain', 3],\n",
       " ['Belanda', 2],\n",
       " ['yang', 2],\n",
       " ['bermain', 2],\n",
       " ['di', 2],\n",
       " ['posisi', 2],\n",
       " ['penyerang', 2]]"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
